HAL DCMI control functions migration ¶
This section provides information about the HAL DCMI control functions migration.
HAL DCMI cropping window configuration ¶
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Function prototype |
HAL_StatusTypeDef HAL_DCMI_ConfigCrop(DCMI_HandleTypeDef *hdcmi,
uint32_t X0,
int32_t Y0,
uint32_t XSize,
uint32_t YSize);
|
hal_status_t HAL_DCMI_SetConfigPipeCrop(hal_dcmi_handle_t *hdcmi,
hal_dcmi_pipe_t pipe,
const hal_dcmi_crop_config_t *p_config)
|
|
Example usage |
DCMI_HandleTypeDef hdcmi1;
(void)HAL_DCMI_ConfigCrop(&hdcmi1,
0U,
0U,
320U,
240U);
|
hal_dcmi_handle_t hdcmi1;
hal_dcmi_crop_config_t crop = {
.x0_pixel = 0U,
.y0_line = 0U,
.xsize_pixel = 320U,
.ysize_line = 240U,
};
(void)HAL_DCMI_SetConfigPipeCrop(&hdcmi1,
HAL_DCMI_PIPE_0,
&crop);
|
Related concepts: Removal and conversion of init structure to configuration structure, Renaming of the handle structure, Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels.
HAL DCMI synchronization unmask configuration ¶
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Function prototype |
HAL_StatusTypeDef HAL_DCMI_ConfigSyncUnmask(DCMI_HandleTypeDef *hdcmi,
const DCMI_SyncUnmaskTypeDef *pSyncUnmask)
|
hal_status_t HAL_DCMI_PARALLEL_SetEmbSyncMask(hal_dcmi_handle_t *hdcmi,
const hal_dcmi_parallel_emb_sync_config_t *p_config)
|
|
Example usage |
DCMI_HandleTypeDef hdcmi1;
DCMI_SyncUnmaskTypeDef sync = {
.FrameStartCode = 0x9AU,
.LineStartCode = 0x11U,
.LineEndCode = 0x22U,
.FrameEndCode = 0x69U,
};
(void)HAL_DCMI_ConfigSyncUnmask(&hdcmi1, &sync);
|
hal_dcmi_handle_t hdcmi1;
hal_dcmi_parallel_emb_sync_config_t sync = {
.frame_start = 0x9AU,
.line_start = 0x11U,
.line_end = 0x22U,
.frame_end = 0x69U,
};
(void)HAL_DCMI_PARALLEL_SetEmbSyncMask(&hdcmi1, &sync);
|
Related concepts: Removal and conversion of init structure to configuration structure, Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels., Add HAL_PPP Prefix to All HAL Peripheral APIs (Defines, Macros, Types, and Functions).
HAL DCMI cropping feature enable ¶
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Function prototype |
HAL_StatusTypeDef HAL_DCMI_EnableCrop(DCMI_HandleTypeDef *hdcmi)
|
hal_status_t HAL_DCMI_EnablePipeCrop(hal_dcmi_handle_t *hdcmi,
hal_dcmi_pipe_t pipe)
|
|
Example usage |
DCMI_HandleTypeDef hdcmi1;
(void)HAL_DCMI_EnableCrop(&hdcmi1);
|
hal_dcmi_handle_t hdcmi1;
(void)HAL_DCMI_EnablePipeCrop(&hdcmi1, HAL_DCMI_PIPE_0);
|
Related concepts: Renaming of the handle structure, Replace Finite Parameter Defines (Including PPP Instances) with Enum Types at HAL Levels.
HAL DCMI cropping feature disable ¶
|
HAL1 |
HAL2 |
|
|---|---|---|
|
Function prototype |
HAL_StatusTypeDef HAL_DCMI_DisableCrop(DCMI_HandleTypeDef *hdcmi)
|
hal_status_t HAL_DCMI_DisablePipeCrop(hal_dcmi_handle_t *hdcmi,
hal_dcmi_pipe_t pipe)
|
|
Example usage |
DCMI_HandleTypeDef hdcmi1;
(void)HAL_DCMI_DisableCrop(&hdcmi1);
|
hal_dcmi_handle_t hdcmi1;
(void)HAL_DCMI_DisablePipeCrop(&hdcmi1, HAL_DCMI_PIPE_0);
|